package woaini.wind.bot.command.dogLickerDiary;

import org.springframework.stereotype.Component;
import woaini.wind.bot.command.dogLickerDiary.api.DutangApi;
import woaini.wind.bot.command.hitokoto.api.HitokotoApi;
import woaini.wind.bot.command.hitokoto.api.HitokotoResDTO;
import woaini.wind.bot.core.command.ICmd;
import woaini.wind.bot.core.command.anno.SubCmd;
import woaini.wind.bot.core.session.Session;
import woaini.wind.bot.command.dogLickerDiary.api.DogLickerDiaryApi;

/**
 * 狗舔日记
 *
 * @author yefeng {@code @Date} 2023-05-16 16:50:39
 */
@Component
public class DebrisCmd implements ICmd {
  @Override
  public String masterCmdName() {
    return "碎片";
  }

  @Override
  public String description() {
    return "各种碎片的话语";
  }

  @SubCmd("舔狗日记")
  public void dogLickerDiary(Session session) {
    session.replyMessage(DogLickerDiaryApi.getDogLickerDiary());
  }

  @SubCmd("毒鸡汤")
  public void dutang(Session session) {
    session.replyMessage(DutangApi.excute());
  }

  @SubCmd("甜鸡汤")
  public void sweet(Session session) {
    //网易云
    HitokotoResDTO resDTO = HitokotoApi.get("j");
    StringBuilder stringBuilder = new StringBuilder();
    stringBuilder.append(resDTO.getHitokoto()).append("\r\n");

    session.replyMessage(stringBuilder.toString());
  }

  @SubCmd("酸鸡汤")
  public void sour(Session session) {
    //网易云
    HitokotoResDTO resDTO = HitokotoApi.get("i");
    StringBuilder stringBuilder = new StringBuilder();
    stringBuilder.append(resDTO.getHitokoto()).append("\r\n");

    session.replyMessage(stringBuilder.toString());
  }
}
